package com.hnas.core.dto;

public class DataBean {

	private String field;
	private String fieldId;
	private String title;
	private String dataType = "string";// 数据类型
	private boolean nullable = true;// 可为空
	private boolean display = true;
	private boolean hidden = false;
	private boolean editable = true;
	private int length;
	private int height;
	private String hint;
	private int maxlength = 0;// 字符长度

	private String ENName;// 英文
	private String CNName;// 中文
	// private String nameId;//查询字段
	private int tagType = 0;// 显示标签的类型
	private boolean readonly = false; // 编辑数据时定义字段不可修改

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getFilterField() {
		return this.fieldId.replaceAll("\\.", "");
	}

	public DataBean(String field, String title) {
		super();
		this.field = field;
		this.title = title;
	}

	public DataBean() {
		super();
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public DataBean(String field, String title, String dataType) {
		super();
		this.field = field;
		this.title = title;
		this.dataType = dataType;
	}

	public boolean isNullable() {
		return nullable;
	}

	public void setNullable(boolean nullable) {
		this.nullable = nullable;
	}

	public DataBean(String field, String title, boolean nullable) {
		super();
		this.field = field;
		this.title = title;
		this.nullable = nullable;
	}

	public DataBean(String field, String title, boolean nullable, int maxlength) {
		super();
		this.field = field;
		this.title = title;
		this.nullable = nullable;
		this.maxlength = maxlength;
	}

	public DataBean(String field, String fieldId, String title, boolean nullable, int maxlength) {
		super();
		this.field = field;
		this.fieldId = fieldId;
		this.title = title;
		this.nullable = nullable;
		this.maxlength = maxlength;
	}

	public DataBean(String field, String fieldId, String title, boolean nullable, int maxlength, boolean readonly) {
		super();
		this.field = field;
		this.fieldId = fieldId;
		this.title = title;
		this.nullable = nullable;
		this.maxlength = maxlength;
		this.readonly = readonly;
	}
	
	public DataBean(String field, String fieldId, String title, boolean nullable, int maxlength, boolean readonly, String dataType) {
		super();
		this.field = field;
		this.fieldId = fieldId;
		this.title = title;
		this.nullable = nullable;
		this.maxlength = maxlength;
		this.readonly = readonly;
		this.dataType = dataType;
	}
	
	public DataBean(String field, String fieldId, String title, boolean nullable, int maxlength, boolean readonly, int tagType) {
		super();
		this.field = field;
		this.fieldId = fieldId;
		this.title = title;
		this.nullable = nullable;
		this.maxlength = maxlength;
		this.readonly = readonly;
		this.tagType = tagType;
	}
	
	public DataBean(String field, String fieldId, String title, boolean nullable, int maxlength, int tagType) {
		super();
		this.field = field;
		this.fieldId = fieldId;
		this.title = title;
		this.nullable = nullable;
		this.maxlength = maxlength;
		this.tagType = tagType;
	}

	public DataBean(String field, String fieldId, String title, String dataType, boolean nullable) {
		super();
		this.field = field;
		this.fieldId = fieldId;
		this.title = title;
		this.dataType = dataType;
		this.nullable = nullable;
	}

	public DataBean(String field, String title, String dataType, boolean nullable) {
		super();
		this.field = field;
		this.title = title;
		this.dataType = dataType;
		this.nullable = nullable;
	}

	public boolean isDisplay() {
		return display;
	}

	public void setDisplay(boolean display) {
		this.display = display;
	}

	public DataBean(String field, String title, String dataType, boolean nullable, boolean display) {
		super();
		this.field = field;
		this.title = title;
		this.dataType = dataType;
		this.nullable = nullable;
		this.display = display;
	}

	public boolean isHidden() {
		return hidden;
	}

	public void setHidden(boolean hidden) {
		this.hidden = hidden;
	}

	public DataBean(String field, boolean hidden) {
		super();
		this.field = field;
		this.hidden = hidden;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public String getHint() {
		return hint;
	}

	public void setHint(String hint) {
		this.hint = hint;
	}

	public boolean isEditable() {
		return editable;
	}

	public void setEditable(boolean editable) {
		this.editable = editable;
	}

	public String getENName() {
		return ENName;
	}

	public void setENName(String eNName) {
		ENName = eNName;
	}

	public String getCNName() {
		return CNName;
	}

	public void setCNName(String cNName) {
		CNName = cNName;
	}

	// public String getNameId() {
	// return nameId;
	// }
	// public void setNameId(String nameId) {
	// this.nameId = nameId;
	// }
	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getMaxlength() {
		return maxlength;
	}

	public void setMaxlength(int maxlength) {
		this.maxlength = maxlength;
	}

	public String getFieldId() {
		return fieldId;
	}

	public void setFieldId(String fieldId) {
		this.fieldId = fieldId;
	}

	public int getTagType() {
		return tagType;
	}

	public void setTagType(int tagType) {
		this.tagType = tagType;
	}

	public boolean isReadonly() {
		return readonly;
	}

	public void setReadonly(boolean readonly) {
		this.readonly = readonly;
	}

}
